package com.day18.ex02;

import java.io.*;

public class ConversionStreamDemo {
    public static void main(String[] args) throws IOException {
        OutputStreamWriter osw = new OutputStreamWriter(new FileOutputStream("D:\\java\\javaSE\\javaSE\\src\\com\\"));
        osw.write("中国");

        osw.close();
        InputStreamReader isr = new InputStreamReader(new FileInputStream("D:\\java\\javaSE\\javaSE\\src\\com\\day18\\ex02\\test.txt"));
        int ch;
        while ((ch = isr.read()) != -1) {
            System.out.println((char) ch);
        }
        isr.close();
    }
}
